home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / rawstat / rawrecov.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-24  |  1.3 KB  |  58 lines

  1. /* 
  2.  * rawproc.c --
  3.  *
  4.  *    Print raw format PROC statistics.
  5.  *
  6.  * Copyright (C) 1986 Regents of the University of California
  7.  * All rights reserved.
  8.  */
  9.  
  10. #ifndef lint
  11. static char rcsid[] = "$Header: /sprite/src/cmds/rawstat/RCS/rawrecov.c,v 1.2 89/10/24 10:14:52 brent Exp $ SPRITE (Berkeley)";
  12. #endif not lint
  13.  
  14. #include "sprite.h"
  15. #include "stdio.h"
  16. #include "sysStats.h"
  17. #include "kernel/recov.h"
  18.  
  19.  
  20. /*
  21.  *----------------------------------------------------------------------
  22.  *
  23.  * PrintRawProcMigStat --
  24.  *
  25.  *    Prints proc_MigStats.
  26.  *
  27.  * Results:
  28.  *    None.
  29.  *
  30.  * Side effects:
  31.  *    None.
  32.  *
  33.  *----------------------------------------------------------------------
  34.  */
  35.  
  36. PrintRawRecovStat()
  37. {
  38.     Recov_Stats stats;        /* statistics buffer */
  39.     Recov_Stats *X = &stats;
  40.     int status;
  41.  
  42.     bzero((Address) &stats, sizeof(stats));
  43.     status = Sys_Stats(SYS_RECOV_STATS, sizeof(stats), (Address) &stats);
  44.     if (status != SUCCESS) {
  45.     return;
  46.     }
  47.  
  48.     printf("Recov_Stats\n");
  49.  
  50.     ZeroPrint("packets        %8u\n", X->packets);
  51.     ZeroPrint("pings          %8u\n", X->pings);
  52.     ZeroPrint("suppressed     %8u\n", X->pingsSuppressed);
  53.     ZeroPrint("timeouts       %8u\n", X->timeouts);
  54.     ZeroPrint("crashes        %8u\n", X->crashes);
  55.     ZeroPrint("reboots        %8u\n", X->reboots);
  56.     ZeroPrint("hostsMonitored %8u\n", X->numHostsPinged);
  57. }
  58.